/*
 * File:   Rule.cpp
 * Author: Elevator
 *
 * Created on 18 Май 2013 г., 21:43
 */

#include "Rule.h"

Rule::Rule( const Command& command, const Action& action ) :
	_command( command ),
	_action( action )
{
}

Rule::Rule( const Rule& rule ) :
	_command( rule._command ),
	_action( rule._action )
{
}

const Command& Rule::GetCommand( ) const
{
	return _command;
}

const Action& Rule::GetAction( ) const
{
	return _action;
}

bool Rule::Check( const Command& command ) const
{
	return command == GetCommand( );
}
